/*
 * @Copyright: Citylife 2021
 * @Author: LiuZhenfang
 * @Date: 2020-12-14 12:48:48
 * @Description: DialogInfo
 */
import 'package:flutter/material.dart';

typedef DialogWidget = Widget Function();

class DialogInfo {
  CLDialogAnimationType animationType;
  CLDialogLevel dialogLevel;
  DialogWidget dialogWidget;
  //eg:如果当前的时新订单弹窗，新来的也是新订单弹窗，通过此标记判断是否需要将当前添加到恢复队列
  final String extra;
  final bool isDismissible;
  final bool enableDrag;

  DialogInfo({
    this.animationType = CLDialogAnimationType.center,
    this.dialogLevel = CLDialogLevel.normal,
    this.isDismissible = false,
    this.enableDrag = false,
    this.extra,
    @required this.dialogWidget,
  }) : assert(
          dialogWidget != null,
          '弹框widget不能为空！！！请检查DialogInfo中的dialogWidget是否为空',
        );
}

enum CLDialogAnimationType {
  center,
  bottom,
}

enum CLDialogLevel {
  high,
  normal,
}
